package cn.com.nes.site.entity.em;

public enum RegisterTypeEnum implements ExcelEnum {
    DO("线圈寄存器(01)", 1, "01", "05"),
    DI("离散输入寄存器(02)", 1, "02", ""),
    HR("保持寄存器(03)", 16, "03", "06"),
    AR("输入寄存器(04)", 16, "04", ""),
    ;

    RegisterTypeEnum(String name, Integer bitLength, String readFunctionCode, String writeFunctionCode) {
        this.name = name;
        this.bitLength = bitLength;
        this.readFunctionCode = readFunctionCode;
        this.writeFunctionCode = writeFunctionCode;
    }

    private final String name;
    private final Integer bitLength;
    private final String readFunctionCode;
    private final String writeFunctionCode;

    public String getName() {
        return name;
    }

    public Integer getBitLength() {
        return bitLength;
    }

    public String getReadFunctionCode() {
        return readFunctionCode;
    }

    public String getWriteFunctionCode() {
        return writeFunctionCode;
    }

    @Override
    public String cellName() {
        return this.name;
    }
}
